<?php if (!defined('THINK_PATH')) exit();?><!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>用户管理</title>
</head>

<body>
<table width="100%" border="1">
  <tr>
    <th scope="col">ID</th>
    <th scope="col">用户名称</th>
    <th scope="col">上一次登录IP</th>
	<th scope="col">上一次登录时间</th>
	<th scope="col">用户所属组别</th>
    <th scope="col">用户状态</th>
    <th scope="col">操作</th>
  </tr>
  <?php if(is_array($user)): $i = 0; $__LIST__ = $user;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$vo): $mod = ($i % 2 );++$i;?><tr>
    <td><?php echo ($vo["id"]); ?></td>
    <td><?php echo ($vo["username"]); ?></td>
	<td><?php echo ($vo["last_login_ip"]); ?></td>
    <td><?php echo (date('y-m-d H:i:s',$vo["last_login_time"])); ?></td>
	<td>
	<?php if($vo["username"] == C("RBAC_SUPERADMIN")): ?>超级管理员
	<?php else: ?>
	<?php echo ($vo['Role'][0][name]); endif; ?>
	</td>
    <td><?php if($vo['lock']): ?>OFF<?php else: ?>ON<?php endif; ?></td>
    <td>
	【<a href="<?php echo U('admin/Rbac/indexlocked',array('id'=>$vo['id']));?>">关闭</a>】&nbsp;|&nbsp;
	【<a href="<?php echo U('admin/Rbac/indexlock',array('id'=>$vo['id']));?>">开启</a>】
	</td>
  </tr><?php endforeach; endif; else: echo "" ;endif; ?>
</table>
</body>
</html>